package com.samehope.ar.controller;


import com.samehope.ar.common.CommonResult;
import com.samehope.ar.service.ISysUserCompanyService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;

import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

/**
 * <p>
 * 用户公司 前端控制器
 * </p>
 *
 * @author Zhang Luo
 * @since 2019-12-23
 */
@RestController
@RequestMapping("/sysUserCompany")
public class SysUserCompanyController {

    @Autowired
    private ISysUserCompanyService sysUserCompanyService;

    @GetMapping("/getCompanyByUser")
    public CommonResult getCompanyByUser(@RequestParam(required = true) Long userId){
        return CommonResult.success(sysUserCompanyService.getCompanyByUser(userId));
    }

}
